package com.xdfsoft.watercounter.controller;

import com.xdfsoft.watercounter.model.Instant;
import com.xdfsoft.watercounter.service.FluxService;
import com.xdfsoft.watercounter.service.FluxServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName:FluxController
 * @Description:TODO
 * @Author:chanchaw
 * @Date:2019/10/9 9:18
 * @Version:1.0
 **/
@CrossOrigin
@RestController
@RequestMapping("/c")
public class FluxController {
    @Autowired
    private FluxService service;


    @GetMapping("/a")
    public List<Instant> getAll(){
        return service.getFlow();
    }
}
